package com.example.teesystem.entity.vo.issue;

import com.example.teesystem.common.valid.ValidErrorMessage;
import com.example.teesystem.common.valid.ValidId;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author : NieYaShi
 * @version : v1.0
 * @createTime : 2022/3/28 10:50
 *
 * 题目插入数据类
 * 部分题目字段的非空验证
 */
@Data
public class IssueInsertVo {

    @NotBlank(message = "问题描述不能为空")
    private String question;

    private String selectionA;

    private String selectionB;

    private String selectionC;

    private String selectionD;

    private String answer;

    private String knowledgeList;

    @NotNull(message = "课程id不能为空")
    @ValidId(message = ValidErrorMessage.COURSE_ID_VALID_FAIL, ifCourseId = true)
    private Integer courseId;

    private String url;

    private Integer difficulty;

    private String analysis;

    @NotNull(message = "题目考察类型不能为空")
    private String issueType;

    @NotNull(message = "题库类型不能为空")
    private Integer trainingExam;

    @NotNull(message = "题目类型不能为空")
    private Integer type;

    @NotNull(message = "章节不能为空")
    private Integer chapterId;

    private String[] selectionAnswer;

    @NotNull(message = "是否纳入特色训练不能为空")
    private boolean isFeature;
}
